
#pragma once

using namespace System::Collections::Generic;

#include "ActionMenuRecord.h"

namespace ttg_internal
{
	namespace utils
	{
		///<summery>
		/// Contains some method for communication with UtilManager.
		/// Will be used by classes, that implements IUtility or Utility.
		///<summery>
		public ref class UtilController
		{
			private:
				List<ActionMenuRecord ^> ^_records;
			internal:
				///<summary>
				/// Returns list with records of action menu.
				///<summary>
				property List<ActionMenuRecord ^> ^Records
				{
					List<ActionMenuRecord ^> ^get()
					{ return _records; }
				}
			public:
				///<summary>
				/// Creates controller with default settings.
				///<summary>
				UtilController()
				{
					_records = gcnew List<ActionMenuRecord ^>();
				}
				///<summary>
				/// Adds record for action menu.
				/// Must be called in IUtility::Init() only.
				///<summary>
				ActionMenuRecord ^AddMenuRecord(ActionMenuRecord ^record)
				{
					_records->Add(record);
					return record;
				}
		};
	}
}
